package com.jade.yh.zsy.mobile.pay.api;

import com.jade.framework.base.util.ResponseUtils;
import com.jade.store.pay.vo.PayOrderVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * Created with IntelliJ IDEA.
 * User: jinya
 * Date: 2017/6/23
 * Time: 23:54
 * TEL :17701640710   MAIL:2009_jinya@163.com
 * To change this template use File | Settings | File Templates.
 */
@RestController
@RequestMapping(value = "/pay", produces = MediaType.APPLICATION_JSON_VALUE)
@Api(value = "收款", description = "财务模块--收款")
public class PayApi {
    /**
     * 扫描支付
     * @param scanView
     * @param request
     * @param response
     * @throws Exception
     */
    @RequestMapping(value =  "aliscan", method = RequestMethod.POST)
    @ApiOperation(value = "支付宝扫码收款", httpMethod = "POST", response = PayOrderVo.class)
    public void aliscan(HttpServletRequest request, HttpServletResponse response)
            throws Exception {

        ResponseUtils.writeSuccessResult(response);
    }
    /**
     * 扫描支付
     * @param scanView
     * @param request
     * @param response
     * @throws Exception
     */
    @RequestMapping(value =  "alisqr", method = RequestMethod.POST)
    @ApiOperation(value = "支付宝收款二维码", httpMethod = "POST", response = PayOrderVo.class)
    public void alisqr(HttpServletRequest request, HttpServletResponse response)
            throws Exception {

        ResponseUtils.writeSuccessResult(response);
    }
    /**
     * 扫描支付
     * @param
     * @param request
     * @param response
     * @throws Exception
     */
    @RequestMapping(value =  "wxscan", method = RequestMethod.POST)
    @ApiOperation(value = "微信宝扫码收款", httpMethod = "POST", response = PayOrderVo.class)
    public void wxscan(HttpServletRequest request, HttpServletResponse response)
            throws Exception {
        ResponseUtils.writeSuccessResult(response);
    }
    /**
     * 扫描支付
     * @param request
     * @param response
     * @throws Exception
     */
    @RequestMapping(value =  "wxqr", method = RequestMethod.POST)
    @ApiOperation(value = "微信扫码支付", httpMethod = "POST", response = PayOrderVo.class)
    public void wxqr(HttpServletRequest request, HttpServletResponse response)
            throws Exception {
        ResponseUtils.writeSuccessResult(response);
    }

    /**
     * 支付结果
     * @param request
     * @param response
     * @throws Exception
     */
    @RequestMapping(value =  "result/{orderNo}", method = RequestMethod.POST)
    @ApiOperation(value = "支付结果", httpMethod = "POST", response = PayOrderVo.class)
    public void result(@ApiParam(value = "商户订单号", required = true) @PathVariable(value = "orderNo") String orderNo, HttpServletRequest request, HttpServletResponse response)
            throws Exception {
        ResponseUtils.writeSuccessResult(response);
    }
}
